<template>
  <div id="item">
    <div class="wrapper">
      <div class="avatar">
        <img width="80" height="80" :src="src" />
        <div class="content">
          <div class="name">{{name}}</div>
          <div class="saledes">
            <span class="star">★★★★★</span>
            <span class="sale">月售{{number}}</span>
            <span v-if="isDeliver" class="el-tag">蜂鸟专送</span>
          </div>
          <div class="send">
            <span class="price">起送￥{{money}} | 免配送费</span>
            <span>|</span>
            <span class="send">{{time}}分钟 {{distance}}km</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Item',
  props: ['name', 'number', 'money', 'time', 'distance', 'src', 'isDeliver'],
  data() {
    return {
      // name: '',
      // number: 0,
      // money: 0,
      // time: 10,
      // distance: 1,
      // src: '../assets/list/food.webp'
    }
  }
}
</script>

<style>
.wrapper {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  line-height: 1;
  font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif;
  color: rgb(128, 123, 123);
  margin: 0;
  border: 0;
  font-weight: normal;
  vertical-align: baseline;
  position: relative;
  font-size: 0;
  padding: 10px 12px 18px 24px;
}

.avatar {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  line-height: 1;
  font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif;
  color: #000;
  float: left;
  padding: 0;
  border: 0;
  font-size: 100%;
  font-weight: normal;
  vertical-align: top;
  display: inline-block;
}
.content {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  line-height: 1;
  font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif;
  color: #000;
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: normal;
  vertical-align: baseline;
  display: inline-block;
  margin-left: 16px;
  font-size: 14px;
  text-align: left;
}

.el-rate {
  display: inline;
}

.el-tag {
  display: inline;

  color: #fff;
  font-size: 0.8rem;
  background-color: #009bff;
  border-radius: 5px;
}

.name {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif;
  color: #000;
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline;
  font-size: 16px;
  line-height: 40px;
  font-weight: 700;
}

.saledes {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif;
  list-style: none;
  pointer-events: auto;
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: normal;
  vertical-align: baseline;
  font-size: 10px;
  line-height: 20px;
  color: #93999f;
  margin-bottom: 8px;
}
.send {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif;
  color: #93999f;
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: normal;
  vertical-align: baseline;
  margin-bottom: 10px;
  line-height: 20px;
  font-size: 12px;
}
.sendtime {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif;
  color: #fff;
  margin: 0;
  border: 0;
  font-size: 100%;
  font-weight: normal;
  vertical-align: baseline;
  position: absolute;
  right: 0%;
  bottom: 30px;
  padding: 0 8px;
  height: 20px;
  line-height: 20px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}
#item {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
